﻿using SUNRPA.CONTROLS.IMPL.util;
using System.Collections.Concurrent;
/// <summary>
/// Excel有Office和Wps目前只支持Office后期加入Wps支持。
/// </summary>
namespace SUNRPA.CONTROLS.IMPL.domain.flowItemParam {
    [Serializable]
    public class SaveOrSaveAsExcelNParam:BaseParam {
        private string saveObject = "{excelObject}";
        //写入方式0保存、1另存为
        private int saveWay = 0;
        private string saveAsPath = "";
        private bool close = false;
        private bool cover = false;
        public int SaveWay {
            get => saveWay; 
            set { 
                saveWay = value;
                NotifyPropertyChanged("SaveWay");
            }  
        }
        public string SaveObject {
            get => saveObject; 
            set { 
                saveObject = value;
                NotifyPropertyChanged("SaveObject");
            }  
        }

        public string SaveAsPath {
            get => saveAsPath; 
            set { 
                saveAsPath = value;
                NotifyPropertyChanged("SaveAsPath");
            }  
        }
        public bool Cover {
            get => cover; 
            set { 
                cover = value;
                NotifyPropertyChanged("Cover");
            }  
        }
        public bool Close {
            get => close; 
            set { 
                close = value;
                NotifyPropertyChanged("Close");
            }  
        }
        public string GetTranslateSaveWay() {
            switch(this.saveWay) {
                case 0:
                    return "保存";
                case 1:
                    return "另存为";
                default : return "保存";
            }
        }
        public string GetTranslateItemInfo() {
            switch(this.saveWay) {
                case 0:
                    return "保存";
                case 1:
                    return $"另存为至{saveAsPath}";
                default : return "";
            }
        }
    }
}
